import { parseLines } from './parseLines';

export type Article = {
  title: string;
  paragraphs: string[];
};

export function parseArticle(text: string): Article {
  const result: Article = {
    title: '',
    paragraphs: [],
  };
  const lines = parseLines(text);
  result.title = lines[0];
  result.paragraphs = lines.slice(1);
  return result;
}
